//
//  NSString+fish_base64.m
//  WZEfengAndEtong
//
//  Created by wanzhao on 16/7/6.
//  Copyright © 2016年 wanzhao. All rights reserved.
//

#import "NSString+fish_base64.h"

@implementation NSString (fish_base64)

/**
 base 64 编码
 */

+ (NSString *)base64Encode:(NSString *)originalStr {
    
    NSData *data = [originalStr dataUsingEncoding:NSUTF8StringEncoding];
    
    return [data base64EncodedStringWithOptions:0];
}

/**
 base64 解密
 */
+ (NSString *)base64Decode:(NSString *)base46Str {
    
    NSData *data = [[NSData alloc] initWithBase64EncodedString:base46Str options:0];
    
    return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}



@end
